﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace IMark.eMartSer
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IeMartServices" in both code and config file together.
    [ServiceContract]
    public interface IeMartServices
    {
        [OperationContract]
        [WebInvoke(Method="GET",
           RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json,
           BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "LaySanPhamTheoLoai/{ID}")]
        List<SAN_PHAM> LaySanPhamTheoLoai(string ID);

        [OperationContract]
        [WebInvoke(Method = "GET",
           RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json,
           BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "LaySanPhamTheoID/{ID}")]
        SAN_PHAM LaySanPhamTheoID(string ID);

        [OperationContract]
        [WebInvoke(Method = "GET",
           RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json,
           BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "LayMenuLoaiSanPham")]
        List<LOAI_SAN_PHAM> LayMenuLoaiSanPham();

        [OperationContract]
        [WebInvoke(Method = "GET",
           RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json,
           BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "LayDanhSachBaiViet")]
        List<BAI_VIET> LayDanhSachBaiViet();

        [OperationContract]
        [WebInvoke(Method = "GET",
           RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json,
           BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "SoSaoTheoIDSP/{ID}")]
        string SoSaoTheoIDSP(string ID);

        [OperationContract]
        [WebInvoke(Method = "GET",
           RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json,
           BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "LayDanhSachDonHangTheoKhachHang/{ID}")]
        List<HOA_DON> LayDanhSachDonHangTheoKhachHang(string ID);

        [OperationContract]
        [WebInvoke(Method = "GET",
           RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json,
           BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "LayChiTietHDTheoMaHD/{ID}")]
        List<CHI_TIET_HD> LayChiTietHDTheoMaHD(string ID);
    }
}
